#!/bin/bash
set -e
set -x
MYDIR="${0%/*}"
cd "$MYDIR/.."
source "recipes/common.sh"


# RECIPE START ash
#

reset_mtime ash ash/configure.ac 
rm -rf build/ash
mkdir -p build/ash
cd build/ash

../../ash/configure \
	${CONFIGURE_ARGS} \
	--enable-static \
	--disable-silent-rules \
	${AUTOCRAP_KLUDGE}

make -j${JOBS}

mkdir -p "${stage}${prefix}/bin"
cp -af src/dash "${stage}${prefix}/bin/ash.static"
# XXX: required for mkimage
ln -sf ash.static "${stage}${prefix}/bin/ash"

cd ../..
# rm -rf build/ash

# RECIPE END ash
